<template>
  <div class="page">
    <div class="scroll-view">
      <!-- <customHeader middleTitle="E团火收银软件" @leftCallBack="goBack" />
      <div class="page-body"></div> -->
    </div>
  </div>
</template>

<script>
import customHeader from "@/components/header/header";
import jsBridge from "@/tools/jsBridge";
export default {
  components: {
    customHeader
  },
  data() {
    return {
      
    };
  },
  methods: {
    goBack() {
      if(String(this.$route.query.close)=="true") {
        jsBridge.closeWindow();
      }else {
        this.$router.back();
      }
    }
  },
  created() {
    let url = ~window.APP.serverUrl.indexOf('app.jindd.com.cn') ? 'http://store.yunqixinxi.com/login#/cloudapp/' : 'http://test3.yunqixinxi.com:8893/login#/cloudapp/';
    this.ajax({
      url: "/newapp/merchantApp/index/queryUserData.do",
      type: "get",
      controlLoading: true
    }).then(res=> {
      if(res.success) {
        this.$router.replace({ 
          path: '/iframe',
          query: {
            title: 'E团火收银软件',
            close: 1,
            url: `${url}?mobile=${res.resultObject.mobile||''}` 
          }
        });
      }
    })
  }
};
</script>

<style lang="scss" scoped>
@import "../../style/public";
</style>